<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml" xmlns:shiro="http://www.w3.org/1999/xhtml">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
<style>
    .bgcoor {
        background: #ffffff;
        padding-top: 20px;
    }

    #exampleTable {
        border-left: 0px;
        border-right: 0px
    }

    #exampleTable th {
        border-left: 0px;
        border-right: 0px
    }

    #exampleTable td {
        border-left: 0px;
        border-right: 0px
    }

    .table .thead-dark th {
        background-color: #f9fafe;
        border-color: #f1f4f5;
    }

    .pass {
        width: 10px;
        height: 10px;
        background: #41c958;
        border-radius: 50%;
        display: inline-block;
        margin-right: 7px;
        margin-bottom: 0px;
    }

    .audit {
        width: 10px;
        height: 10px;
        background: #fe8900;
        border-radius: 50%;
        display: inline-block;
        margin-right: 7px;
        margin-bottom: 0px;
    }

    .dedetels {
        width: 10px;
        height: 10px;
        background: red;
        border-radius: 50%;
        display: inline-block;
        margin-right: 7px;
        margin-bottom: 0px;
    }

    .finish {
        width: 10px;
        height: 10px;
        background: #a4bac8;
        border-radius: 50%;
        display: inline-block;
        margin-right: 7px;
        margin-bottom: 0px;
    }

    .bootstrap-table .fixed-table-container {
        height: 550px !important;
        font-size: 15px;
    }

    #exampleTable thead {
        position: sticky !important;
        top: -2px;
    }

    .fixed-table-toolbar .bs-bars {
        width: 100%;
    }
    #exampleToolbar{
        flex-direction: var(--columnAndReverse);
    }
</style>
<div class="wrapper wrapper-content ">
    <div class="col-sm-12 bgcoor">
        <div id="exampleToolbar" style="    display: flex;width: 100%;">
            <div class="columns pull-left" style="display: flex;  align-items: center;">
                <button shiro:hasPermission="jzweb:itemBank:add" type="button" class="btn  btn-primary"
                        onclick="add()" style="margin-right: 10px;">
                    <i class="fa fa-plus" aria-hidden="true"></i>添加
                </button>

                <button shiro:hasPermission="jzweb:itemBank:review" type="button" class="btn  btn-warning"
                        onclick="examine('/jzweb/itemBank')" style="margin-right: 10px;">
                    <i class="fa fa-check" aria-hidden="true"></i>审核
                </button>

                <form shiro:hasPermission="jzweb:itemBank:import" id="importExcelForm" method="post"
                      enctype="multipart/form-data" style="margin-right: 10px;">
                    <input class="form-control" style="width:200px;height: 100%" name="file" id="fileUrl" type="file">
                </form>
                <button shiro:hasPermission="jzweb:itemBank:import" type="button"
                        class="btn  btn-primary"
                        onclick="importExcel1($('#fileUrl'),$('#importExcelForm'),$('#cprofileId').val(),$('#kpointsId').val(),'/jzweb/itemBank/import')">
                    <i class="fa fa-upload" aria-hidden="true"></i>导入
                </button>
                <button shiro:hasPermission="jzweb:itemBank:import" type="button" class="btn  btn-primary"
                        onclick="downExcelModel('/jzweb/itemBank/downloadImportTemplate')" style="margin-left:10px;margin-right: 10px;">
                    <i class="fa fa-download" aria-hidden="true"></i>下载导入模板
                </button>
                <button shiro:hasPermission="jzweb:itemBank:batchRemove" type="button" class="btn  btn-danger"
                        onclick="batchRemove()" style="margin-right: 10px;">
                    <i class="fa fa-trash" aria-hidden="true"></i>删除
                </button>
            </div>
            <div style="display: flex; flex-direction: row;justify-content: flex-start;align-items: center;">

                <div class="columns col-md-1 nopadding">
                    <select class="form-control" shiro:hasPermission="jzweb:itemBank:import" id="cprofileId">
                        <option value="">请选择所属证书</option>
                        <option th:each="item : ${cprofileIds}" th:value="${item.id}" th:text="${item.name}"></option>
                    </select>
                </div>
                <div class="columns col-md-1.5 nopadding" style="margin-left: 10px">
                    <select class="form-control" shiro:hasPermission="jzweb:itemBank:import" id="kpointsId"
                            name="kpointsId">
                        <option value="">请选择知识点领域</option>
                    </select>
                </div>

                <div class="columns col-md-1.5  nopadding" style="margin-left: 10px">
                    <select id="searchItemBankType" name="searchItemBankType" class="form-control">
                        <option value="">选择题库类型</option>
                        <option value="0">练习题</option>
                        <option value="1">考试题</option>
                    </select>
                </div>
                <div class="columns col-md-1.5  nopadding" style="margin-left: 10px">
                    <select id="searchTopicTypes" name="searchTopicTypes" class="form-control">
                        <option value="">选择题目类型</option>
                        <option value="0">单选</option>
                        <option value="1">多选</option>
                        <option value="2">判断</option>
                        <option value="3">实操</option>
                        <option value="4">婴幼儿早期教育发展分析</option>
                    </select>
                </div>
                <div class="columns col-md-1.5 nopadding" style="margin-left: 10px">
                    <select id="searchtype" name="searchtype" class="form-control">
                        <option value="">请选择类型</option>
                        <option value="0">理论</option>
                        <option value="1">技能</option>
                    </select>
                </div>
                <div class="columns col-md-1.5  nopadding" style="margin-left: 10px">
                    <select id="searchstate" name="searchstate" class="form-control">
                        <option value="">请选择状态</option>
                        <option value="0">待审核</option>
                        <option value="1">已通过</option>
                        <option value="2">未通过</option>
                        <option value="9">已删除</option>
                    </select>
                </div>
                <div class="columns col-md-1.5 nopadding" style="margin-left: 10px">
                    <input id="kpointsName" type="text" class="form-control"
                           placeholder="请输入知识点领域">
                </div>
                <div class="columns col-md-1.5 nopadding" style="margin-left: 10px">
                    <input id="profileName" type="text" class="form-control"
                           placeholder="请输入证书名称">
                </div>
                <div class="columns col-md-1.5 nopadding" style="margin-left: 10px">
                    <input id="searchTopicContent" type="text" class="form-control"
                           placeholder="请输入题目内容">
                </div>
                <div style="margin-left: 10px" class="columns pull-left" style="margin-left: 10px">
                    <button class="btn btn-success" onclick="reLoad()">查询</button>
                </div>
            </div>
        </div>
        <table id="exampleTable" data-mobile-responsive="true">
        </table>

    </div>
</div>
<!--shiro控制bootstraptable行内按钮看见性 -->
<div>
    <script type="text/javascript">
        var s_edit_h = 'hidden';
        var s_remove_h = 'hidden';
        var s_resetPwd_h = 'hidden';
    </script>
</div>
<div shiro:hasPermission="jzweb:itemBank:edit">
    <script type="text/javascript">
        s_edit_h = '';
    </script>
</div>
<div shiro:hasPermission="jzweb:itemBank:remove">
    <script type="text/javascript">
        var s_remove_h = '';
    </script>
</div>
<div shiro:hasPermission="jzweb:itemBank:resetPwd">
    <script type="text/javascript">
        var s_resetPwd_h = '';
    </script>
</div>
</div>
<div th:include="include :: footer"></div>
<script type="text/javascript" src="/js/webJs/jzweb/itemBank/itemBank.js"></script>
</body>
</html>